package com.bd.rj.backstage.config;

import com.bd.rj.common.listener.OnlineUserListener;
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ListenerConfig {
    @Bean
    public ServletListenerRegistrationBean listenerRegist() {
        ServletListenerRegistrationBean srb = new ServletListenerRegistrationBean();
        srb.setListener(new OnlineUserListener());
        System.out.println("用户监听器启动...");
        return srb;
    }
}
